#ifndef _JitteredSampler_H_
#define _JitteredSampler_H_

#pragma once
#include "Sampler.h"

class JitteredSampler : public Sampler {
private:
	void generateSamples() {
		int n = int(sqrt(numSamples));
		samples.reserve(numSets * numSamples);

		for (int p = 0; p < numSets; p++)
			for (int j = 0; j < n; j++)
				for (int k = 0; k < n; k++) {
					samples.emplace_back((k + RAND) / n, (j + RAND) / n);
				}
	}

public:
	JitteredSampler(int numSamples) : Sampler(numSamples) {}
	JitteredSampler(int numSamples, int numSets) : Sampler(numSamples, numSets) {}
	~JitteredSampler() {}
};

#endif // _JitteredSampler_H_